package edu.brandeis.cs.steele.spider;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class ActionOnPageGrep implements ActionOnPage {

    @Override
    public String act(InputStream stream) throws IOException{
	BufferedReader rd = new BufferedReader(new InputStreamReader(stream));
	String line;
	String res = "";
	while ((line = rd.readLine()) != null) {
	    res = WebSpider.grepURLMP3(line);
	    if (!res.equals(""))
		break;
	}
	return res;
    }

}
